﻿using System;
using EnvDTE;
using EnvDTE80;

namespace VsTortoiseSVN.Commands
{
    public class About : CommandBase
    {
        Dialogs.AboutDialog _aboutDialog;

        public About(DTE2 application, string name, string caption, string tooltip, int bitmapId)
            : base(application, name, caption, tooltip, bitmapId)
        {
        }

        public override vsCommandStatus QueryStatus()
        {
            return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
        }

        public override bool Exec()
        {
            if(_aboutDialog == null)
                _aboutDialog = new Dialogs.AboutDialog();

            _aboutDialog.ShowDialog();
            return true;
        }
    }
}
